<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateParkPestsTable extends Migration
{
    /**
     * Run the migrations.
     *园林养护虫害规程表
     *
     * @return void
     */
    public function up()
    {
        Schema::create('park_pests', function (Blueprint $table) {
            //字段定义
            $table->increments('id');
            $table->string('pest_name')->comment('绿化养护虫害题名');
            $table->string('pest_keyword')->comment('养护虫害关键词');
            $table->text('pest_content')->comment('养护虫害内容');
            $table->integer('upload_id')->unsigned()->comment('上传人');
            $table->integer('attached_page')->unsigned()->comment('附件页数');
            $table->string('pest_user')->comment('适用人群');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('park_pests');
    }
}
